﻿@model Models.Models.Login

@{
    ViewBag.Title = "Login";
}

@Scripts.Render("~/scripts/app/" + Path.GetFileNameWithoutExtension(Server.MapPath(VirtualPath)) + ".js")

@using (Html.BeginForm("Login", "Account", null, FormMethod.Post, new { id = "login", @class = "form-horizontal" }))
{       
    <fieldset>
        <ul class="breadcrumb">
          <li><img src="~/Images/glyphicons/png/glyphicons_044_keys.png" height="20px" /></li>
          <li class="active">@ViewBag.Title</li>
        </ul>

        <div class="alert alert-info">
            Please use your registration email address and password to log in.
        </div>

        @Html.ValidationSummary()

        <div class="control-group">    
            <label class="control-label" for="input01">@Html.LabelFor(m => m.UserEmail)</label>
            <div class="controls">@Html.TextBoxFor(m => m.UserEmail)</div>
        </div>

        <div class="control-group">    
            <label class="control-label" for="input01">@Html.LabelFor(m => m.Password)</label>
            <div class="controls">@Html.PasswordFor(m => m.Password)</div>
        </div>

        <div class="control-group">    
            <label class="control-label" for="input01">@Html.LabelFor(m => m.RememberMe)</label>
            <div class="controls">@Html.CheckBoxFor(m => m.RememberMe)</div>
        </div>

        @Html.HiddenFor(m => m.ReturnUrl)

        <div class="controls btn-group">    
            <button type="submit" class="btn btn-inverse"><i class="icon-ok icon-white"></i> Login</button>
        </div>    
    </fieldset>
}

<div id="divResult">
    @if (Model != null && Model.UserEmail != null)
    {
        Html.RenderPartial("PasswordReminderPartial", new Models.Models.PasswordReminder { UserEmail = Model.UserEmail, SecureQuestion = Model.SecureQuestion });
    }
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}